package edu.tgc.entity.teaching;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.data.annotation.CreatedBy;
import org.springframework.format.annotation.DateTimeFormat;

import edu.tgc.entity.student.TbStudent;
import edu.tgc.entity.system.BaseEntity;
import edu.tgc.entity.system.SysUser;

@Entity
public class TbParticipant extends BaseEntity{
	private TbStudent student;
	private Enroll enroll;
	private String comment;
	private Double cost;
	private SysUser creator;
	private Date createTime;
	
	@CreatedBy
	@ManyToOne
	public TbStudent getStudent() {
		return student;
	}
	public void setStudent(TbStudent student) {
		this.student = student;
	}
	
	@CreatedBy
	@ManyToOne
	public Enroll getEnroll() {
		return enroll;
	}
	public void setEnroll(Enroll enroll) {
		this.enroll = enroll;
	}
	public String getComment() {
		return comment;
	}
	public void setComment(String comment) {
		this.comment = comment;
	}
	public Double getCost() {
		return cost;
	}
	public void setCost(Double cost) {
		this.cost = cost;
	}
	
	@ManyToOne
	@CreatedBy
	public SysUser getCreator() {
		return creator;
	}
	public void setCreator(SysUser creator) {
		this.creator = creator;
	}
	
	@Temporal(value=TemporalType.TIMESTAMP)
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	
	
}
